package com.jxk.test.entity;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @ClassName : Animal  //类名
 * @Description :   //描述
 * @Author : jxk  //作者
 * @Date: 2020-09-21 18:54  //时间
 */
@Data
@Validated
public class Animal {
    @NotNull
    private String type;
    @Size(max = 6,min = 4)
    private String name;
    @Pattern(regexp = "0?(13|14|15|17|18|19)[0-9]{9}")
    private String phone;
}
